⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dealfirst.jsp

📁 财务说明的管理
💻 JSP
📖 第 1 页 / 共 3 页
字号:
                      comexcu=(modcancu* 0.85);
                          comexzn=(modcanzinc  * 0.15);
                    }else
                    if(salloy.indexOf("22000")>0)
                    {
                        price = (((modcancu + (basecpr/100))* 0.90) + ((modcanzinc * 0.10)+ (basezpr/100)* 0.10)) ;
                          comexcu=modcancu* 0.90 ;
                           comexzn=(modcanzinc  * 0.10) ;
                    }else
                    {
                        out.print("<script>alert('PRMETAL  Missing Modine Canadian metal price. Contact Accounting!');</script>");
                    }
                }else
                 if(rsCustomer.getString("CURRENCY").equals("CA"))
                 {
                     if(salloy.indexOf("26000 27000 27130 26010 26020 26030 26120 26130") > 0)
                     {
                         price = (((copper + (basecpr/100))* 0.70) + ((zinc * 0.30)+ (basezpr/100)* 0.30)) ;
                       comexcu=(copper* 0.70) ;
                       comexzn=(zinc  * 0.30) ;
                     }else
                      if(salloy.indexOf("23000 24000")>0)
                    {
                        price = (((copper + (basecpr/100))* 0.85) + ((zinc * 0.15)+ (basezpr/100)* 0.15)) ;
                           comexcu=(copper* 0.85);
                        comexzn=(zinc  * 0.15);
                    }else
                    if(salloy.indexOf("21000 22000")>0)
                    {
                        price = (((copper + (basecpr/100))* 0.90) + ((zinc * 0.10)+ (basezpr/100)* 0.10)) ;
                          comexcu=(copper* 0.90) ;
                         comexzn=zinc  * 0.10;
                    } else
                     if(StringUtils.copper(salloy) )
                    {
                        price = copper + (basecpr/100) ;
                       comexcu=copper ;
                         comexzn=0.0  ;
                    } else
                    {
                        out.print("<script>alert('PRMETAL  Missing Canadian metal price. Contact Accounting!');</script>");
                    }
                 }else
                  if(rsCustomer.getString("CURRENCY").equals("US"))
                 {
                       if(StringUtils.copper(salloy) )
                    {
                        price = uscopper + (basecpr/100);
                           comexcu=uscopper;
                          comexzn=0.0  ;
                    } else
                         if(salloy.indexOf("26000 27000 27130 26010 26020 26030 26120 26130")>0)
                    {
                        price = (((uscopper + (basecpr/100))* 0.70) + ((uszinc * 0.30)+ (basezpr/100)* 0.30)) ;
                          comexcu=(uscopper* 0.70) ;
                            comexzn=uszinc  * 0.30;
                    }else
                         if(salloy.indexOf("23000 24000")>0)
                    {
                          price = (((uscopper + (basecpr/100))* 0.85) + ((uszinc * 0.15)+ (basezpr/100)* 0.15));
                          comexcu=uscopper* 0.85   ;
                          comexzn=uszinc  * 0.15  ;
                    }else
                         if(salloy.indexOf("21000 22000")>0)
                    {
                         price = (((uscopper + (basecpr/100))* 0.90) + ((uszinc * 0.10)+ (basezpr/100)* 0.10)) ;
                      comexcu=(uscopper* 0.90);
                         comexzn=(uszinc  * 0.10) ;
                    } else
                    {
                        out.print("<script>alert('PRMETAL  Missing US metal price. Contact Accounting!');</script>");
                    }
                 }
                metalpr = price;

//取价格参数
 %>  <!-- 取价格参数  -->
<%
    //执行价格转换
              if(!Pricelist.equals("XXXX"))
              {

                    ASResultSet rsPrice=Sqlca.getASResultSet("select * from price where pricelist='"+ Pricelist+"'");
                  if(!rsPrice.next() )
                  {
                      fabpr=0;
                      out.print("<script>alert('Price list " + Pricelist +" not found!');</script>");
                      return;
                  }

                 int len= rsShipment.getString("desc").substring(21,26).length() ;
                  switch(len)
                  {
                      case 1:
                           dnom=10;
                          case 2:
                              dnom=100;
                              case 3:
                                  dnom=1000;
                                  case 4:
                                      dnom=10000;
                                      default:
                                      dnom=100000;

                  }
                  sgauge =Double.valueOf(rsShipment.getString("desc").substring(21,26)).doubleValue() /dnom;
                  if(rsPrice.next() )
                  {
                         ldesc=rsPrice.getString("gaugefrom").trim().length();
                      switch(ldesc)
                      {
                          case 1:
                              dnom=10;
                              case 2:
                                  dnom=100;
                                  case 3:
                                      dnom=1000;
                                      case 4:
                                          dnom=10000;
                                          default:
                                              dnom=100000;
                      }
                      nfrom=Double.valueOf(rsPrice.getString("gaugefrom")).doubleValue() /dnom;
                      ldesc=rsPrice.getString("gaugeto").trim().length() ;
                      switch(ldesc)
                      {
                          case 1:
                              dnom=10;
                              case 2:
                                  dnom=100;
                                  case 3:
                                      dnom=1000;
                                      case 4:
                                          dnom=10000;
                                          default:
                                              dnom=10000;
                      }
                      nto  =Double.valueOf(rsPrice.getString("gaugeto")).doubleValue() / dnom;
                  }
                  String alloy=rsShipment.getString("alloy");
                  if(sgauge> nfrom && sgauge < nto)
                  {
                       if(salloy.indexOf("11000 C1100")  >0 )                      /////salloy    还是alloy ????
                       {
                           ninvprice  = Double.valueOf(rsPrice.getString("petp")).doubleValue() ;
                       }
                      if(StringUtils.copper(alloy))
                      {
                          ninvprice  = Double.valueOf(rsPrice.getString("plpc")).doubleValue() ;
                      }
                      if(alloy.indexOf("26000 26120 26130 27000 27130") > 0)
                      {
                           ninvprice  = Double.valueOf(rsPrice.getString("p7030")).doubleValue() ;
                      }
                      if(alloy.indexOf("23000 24000") > 0)
                      {
                           ninvprice  = Double.valueOf(rsPrice.getString("p8515")).doubleValue() ;
                      }
                      if(alloy.indexOf("22000") > 0)
                      {
                           ninvprice  = Double.valueOf(rsPrice.getString("p9010")).doubleValue() ;
                      }
                      ninvprice = ninvprice /100;
                  }
                  fabpr =  ninvprice;
                   if(rsCustomer.getString("contract").equals("") && fabpr==0)
                      {

                            out.print("<script>alert('Price list " + Pricelist +" not found!');</script>");
                          return;
                      }
                    fabpr=fabpr + Double.valueOf( rsCustomer.getString("nfabextra")).doubleValue() ;
                     ASResultSet rsprwidth=Sqlca.getASResultSet("select * from prwidth where pricelist= "+ Pricelist);
                  if(!rsprwidth.next() )
                  {
                      out.print("<script>alert('Price list " + Pricelist +" not found!');</script>");
                      widthcharg=0;
                      return;
                  }else
                  {
                       swidth = Double.valueOf(rsShipment.getString("desc").substring(11,18)).doubleValue() ;
                      if(swidth > Double.valueOf(rsprwidth.getString("widthfrom")).doubleValue() && swidth < Double.valueOf(rsprwidth.getString("widthto")).doubleValue() )
                      {
                           widthcharg = Double.valueOf(rsprwidth.getString("widthcharg ")).doubleValue() ;
                      }
                      widthcharg = widthcharg  / 100;
                  }
                  widthpr =   widthcharg;
                   String stemper="";


                    boolean retur=true;
                              double nmillspec=0;
                   ASResultSet rsprother=Sqlca.getASResultSet("select * from prother where pricelist= "+ Pricelist);
                  if(!rsprother.next() )
                  {
                      out.print("<script>alert('Price list " + Pricelist +" not found!');</script>");
                      metalpr = 0;
                      return;
                  }else
                  {
                       if(StringUtils.copper(alloy))
                       {
                           stemper=rsShipment.getString("desc").substring(7,10);
                           weldpr=0;
                            if(stemper.indexOf("HD  SFT HDX LHD")  <  0 )
                            {
                                   temperpr = rsprother.getDouble("intercharg") / 100;
                            }
                            if(stemper.indexOf("26130 27130") > 0 )
                            {
                                   inhibpr = rsprother.getDouble("inhibcharg") / 100;
                            }
                       }else
                       {
                               ASResultSet rsmillcode=Sqlca.getASResultSet("select * from millcode order by millspec");
                           if(rsmillcode.next() )
                           {        //没有取nmillspec 值
                                  if(nmillspec==rsmillcode.getDouble("millspec"))
                                  {
                                      if(StringUtils.brass(rsmillcode.getString("alloy")))
                                      {
                                          if(rsmillcode.getDouble("lbsinwidth") > 300 )
                                          {
                                              retur=true;
                                          }
                                          else
                                          {
                                              retur=false;
                                          }
                                      }else
                                      {
                                          retur=false;
                                      }
                                  }
                           }
                           if(retur==true)
                           {
                               weldpr=rsprother.getDouble("weldpr") / 100 ;
                           }
                           else
                           {
                               weldpr=0;
                           }
                       }
                  }

                 //prmetal



     //执行价格转换
%> <!-- 执行价格转换  -->
<%
                   if(rsCustomer.getString("currency").trim().equals("UK"))
                   {

                   }


                 if(rsOrditem.getString("contract").trim() .equals("FERGUS-A"))
                 {
                       price =price + 0.10;
                     if(rsCustomer.getString("weight").equals("KGS"))
                     {
                         price = price * 2.2046;                   //待续
                         comexcu  = comexcu  * 2.2046;
                         comexzn  = comexzn  * 2.2046;
                         islbs=false;
                     }
                 }
                if(rsOrditem.getString("contract").trim() .equals("FERGUS-B"))
                 {
                      price =price -0.04;
                     if(rsCustomer.getString("weight").equals("KGS"))
                     {
                           price = price * 2.2046;                   //待续
                         comexcu  = comexcu  * 2.2046;
                         comexzn  = comexzn  * 2.2046;
                         islbs=false;                  //待续
                     }
                 }
                   if(rsOrditem.getString("contract").trim() .equals("FERGUS-C"))
                 {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -