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

📄 dealfirst.jsp

📁 财务说明的管理
💻 JSP
📖 第 1 页 / 共 3 页
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBeginMD.jsp"%>
<%@ page import="com.hexiesoft.utils.Consts" %>
<%@ page import="com.hexiesoft.utils.StringUtils"%>
<%
    String sTitle = (String)Configure.getConfigure(sIe_Language, "BOL").get("Title");
	String sBol = (String)Configure.getConfigure(sIe_Language, "BOL").get("Bol");
    String sCurrency = (String)Configure.getConfigure(sIe_Language, "BOL").get("Currency");

    String sFrghtFrwd = (String)Configure.getConfigure(sIe_Language, "BOL").get("FrghtFrwd");
    String sShipDate = (String)Configure.getConfigure(sIe_Language, "BOL").get("ShipDate");

    String sBroker = (String)Configure.getConfigure(sIe_Language, "BOL").get("Broker");
    String sCountry = (String)Configure.getConfigure(sIe_Language, "BOL").get("Country");

     String sCarrier = (String)Configure.getConfigure(sIe_Language, "BOL").get("Carrier");
    String   sPriceList = (String)Configure.getConfigure(sIe_Language, "BOL").get("PriceList");

    String sCustomer = (String)Configure.getConfigure(sIe_Language, "BOL").get("Customer");
    String sInvoiceDate= (String)Configure.getConfigure(sIe_Language, "BOL").get("InvoiceDate");

    String sRoute= (String)Configure.getConfigure(sIe_Language, "BOL").get("Route");

    String sInvoiceTo= (String)Configure.getConfigure(sIe_Language, "BOL").get("InvoiceTo");
    String sShipto= (String)Configure.getConfigure(sIe_Language, "BOL").get("Shipto");

    String sName = (String)Configure.getConfigure(sIe_Language, "BOL").get("name");
    String sExitpt = (String)Configure.getConfigure(sIe_Language, "BOL").get("exitpt");

    String sSubmit = (String)Configure.getConfigure(sIe_Language, "BOL").get("Submit");
     String sReedit = (String)Configure.getConfigure(sIe_Language, "BOL").get("Reedit");
     String sAbort = (String)Configure.getConfigure(sIe_Language, "BOL").get("Abort");

 String sExitFreight = (String)Configure.getConfigure(sIe_Language, "BOL").get("ExitFreight");

    String  vBol = DataConvert.toRealString(iPostChange,(String)CurPage.getParameter("Bol"));
  // String  m_shipdt = DataConvert.toRealString(iPostChange,(String)request.getParameter("Shipdt"));

    String  FrghtFrwd = DataConvert.toRealString(iPostChange,CurPage.getParameter("FrghtFrwd"));
    String  Exitpt = DataConvert.toRealString(iPostChange,CurPage.getParameter("Exitpt"));
     String  Broker = DataConvert.toRealString(iPostChange,CurPage.getParameter("Broker"));
     String  Carrier = DataConvert.toRealString(iPostChange,CurPage.getParameter("Carrier"));
     String  Customer = DataConvert.toRealString(iPostChange,CurPage.getParameter("Customer"));
     String  vshipdt = DataConvert.toRealString(iPostChange,CurPage.getParameter("vshipdt"));
     String  bladd1 = DataConvert.toRealString(iPostChange,CurPage.getParameter("bladd1"));
     String  bladd2 = DataConvert.toRealString(iPostChange,CurPage.getParameter("bladd2"));
     String  bladd3 = DataConvert.toRealString(iPostChange,CurPage.getParameter("bladd3"));
    String  bladd4 = DataConvert.toRealString(iPostChange,CurPage.getParameter("bladd4"));
     String  shadd1 = DataConvert.toRealString(iPostChange,CurPage.getParameter("shadd1"));
     String  shadd2 = DataConvert.toRealString(iPostChange,CurPage.getParameter("shadd2"));
     String  shadd3 = DataConvert.toRealString(iPostChange,CurPage.getParameter("shadd3"));
    String  shadd4 = DataConvert.toRealString(iPostChange,CurPage.getParameter("shadd4"));
    String  Currency = DataConvert.toRealString(iPostChange,CurPage.getParameter("Currency"));
    String  Country = DataConvert.toRealString(iPostChange,CurPage.getParameter("Country"));
    String  Pricelist = DataConvert.toRealString(iPostChange,CurPage.getParameter("Pricelist"));
    String  Route = DataConvert.toRealString(iPostChange,CurPage.getParameter("Route"));
    String  InvoiceDate = DataConvert.toRealString(iPostChange,CurPage.getParameter("InvoiceDate"));
     String  ExitFreight = DataConvert.toRealString(iPostChange,CurPage.getParameter("ExitFreight"));


    float tgross =0;
    float tnet   =0;
    float tcoils =0;
    float tnotes  =0;
    String pricelist="";
    boolean IsTinning=true;
    boolean islbs=true;
    String toll="";
    double metalpr =0;
    double price=0;
    double comexcu  =0;
    double comexzn  =0;
    double valeocu=0;
    double valeozinc=0;
    double  modinecu=0;
    double  modinezinc=0;
    double  modcancu=0;
    double    modcanzinc=0;
    double copper=0;
    double zinc=0;
    double  uscopper=0;
    double  uszinc=0;
    double millspec=0;


    double fabpr   =0;       //ninvprice
    double dnom=0;
    double sgauge =0;
    double nfrom=0;
    double nto  =0;
    int ldesc=0;
    double ninvprice =0;  //fan hui zhi

    double widthpr =0;    //widthcharg
    double swidth=0;
    double widthcharg =0; //fan hui zhi


    double  unitdutypr 	= 0.0     ;

    double    premiumpr		=0.0     ;

    double invunit=0;



    double    inhibpr=0;
    double    temperpr=0;
    double    weldpr=0;
    double    tinningpr=0;
    double    quantitypr=0;


    double totorder  =0;


    double fsurrate=0;   //////燃油税率
      String plant="";

      String Worksno="";
            String Custpo="";
            String  mt_width  ="";
            String mt_gauge= "";
            String Desc=  "";
            String Net="";
            String Contract ="";
            String Custprod  ="";
            String  Custspec ="";
    ASResultSet rsGlobal=Sqlca.getASResultSet("select  * from global");
    if(rsGlobal.next())
    {   valeocu=rsGlobal.getDouble("valeocu");
        valeozinc=rsGlobal.getDouble("valeozinc");
        modinecu=rsGlobal.getDouble("modinecu");
        modinezinc=rsGlobal.getDouble("modinezinc");
        modcancu=rsGlobal.getDouble("modcancu");
        modcanzinc=rsGlobal.getDouble("modcanzinc");
        copper  =rsGlobal.getDouble("copper");
        zinc     =rsGlobal.getDouble("zinc");
        uscopper    =rsGlobal.getDouble("uscopper");
        uszinc    =rsGlobal.getDouble("uszinc");
        millspec  =rsGlobal.getDouble("millspec");
        plant= rsGlobal.getString("plant");
        if(rsGlobal.getString("plant").equals("FERG"))
        {
            IsTinning=true;
        }
        else
        {
            IsTinning=false;
        }
    }

%>

<%
    ASResultSet rsShipment=Sqlca.getASResultSet("select *  from shipment where blno="+vBol);
     if(rsShipment.next())
     {


         ASResultSet rsOrditem=Sqlca.getASResultSet("select * from ord_item where worksno='"+ rsShipment.getString("worksno")+"'");
         if(rsOrditem.next() )
         {      String dw="";
            if( rsOrditem.getString("islbs").equals("0"))  {  dw="lbs";   }   else{dw="kgs";}
               if(islbs==true)
               {
                   totorder=rsOrditem.getDouble("lbs") *  rsOrditem.getDouble("priceprem")+rsOrditem.getDouble("lbs") *  rsOrditem.getDouble("pricemetal")+ rsOrditem.getDouble("lbs") *rsOrditem.getDouble("pricefab");
               }
             else
               {
                    totorder=rsOrditem.getDouble("kgs") *  rsOrditem.getDouble("priceprem")+rsOrditem.getDouble("kgs") *  rsOrditem.getDouble("pricemetal")+ rsOrditem.getDouble("kgs") *rsOrditem.getDouble("pricefab");
               }



             tgross  =tgross - rsShipment.getFloat("loaded");
                     tnet    =tnet +   rsShipment.getFloat("net")  ;
                     Net= String.valueOf(tnet) + dw;
                     tcoils  =tcoils +   rsShipment.getFloat("coils");
                     tnotes  =tnotes +   rsShipment.getFloat("notes");

            ASResultSet rsCustomer=Sqlca.getASResultSet("select * from customer where account='"+ rsShipment.getString("account") + "' and subacct='"+rsShipment.getString("subacct")+"'");
            if(rsCustomer.next() )
            {
                 if  (rsShipment.getString("ordertype").equals("REG"))
                 {
                  fsurrate = rsCustomer.getDouble("fsurrate");
                 }else
                 {
                     fsurrate=0;
                 }

%>
<%
    //取价格参数
                double basecpr=0;
                double  basezpr=0;
                ASResultSet rsProther=Sqlca.getASResultSet("select basecpr from prother where pricelist='"+ Pricelist+"'");
                if(rsProther.next() ){
                    basecpr=rsProther.getDouble("basecpr");
                    basezpr=rsProther.getDouble("basezpr");
                }

                String salloy=rsShipment.getString("desc").substring(0,5);
                if(rsShipment.getString("account").equals("VALCAN") )
                {
                    if(StringUtils.copper(salloy) )
                    {
                        price  =valeocu + basecpr/100;
                        comexcu=valeocu;
                        comexzn=0.0;
                    } else
                    if(salloy.indexOf("26000 27000 27130 26010 26020 26030 26120 26130")>0)
                    {
                       price =(valeocu + basecpr/100)* 0.70 + basezpr * 0.30 + (basezpr/100)* 0.30;
                      comexcu= valeocu* 0.70;
                      comexzn=valeozinc  * 0.30;
                    }  else
                     if(salloy.indexOf("23000 24000")>0)
                    {
                      price =( valeocu + basecpr/100)* 0.85 + valeozinc * 0.15+ (basezpr/100)* 0.15;
                     comexcu=valeocu* 0.85;
                     comexzn=valeozinc  * 0.15;
                    } else
                    if(salloy.indexOf("22000")>0)
                    {
                       price = (((valeocu + (basecpr/100))* 0.90) + ((valeozinc * 0.10)+ (basezpr/100)* 0.10));
                      comexcu=(valeocu* 0.90);
                       comexzn=(valeozinc  * 0.10) ;

                    } else
                    {
                        out.print("<script>alert('PRMETAL  Missing Valeo metal price. Contact Accounting!');</script>");
                    }

                }else
                if(rsShipment.getString("account").equals("MODUSD MODCUS") )
                {
                   if(StringUtils.copper(salloy) )
                    {
                        price  =modinecu + basecpr/100;
                        comexcu=modinecu;
                        comexzn=0.0;
                    }else
                   if(salloy.indexOf("26000 27000 27130 26010 26020 26030 26120 26130")>0)
                   {
                     price = (((modinecu + (basecpr/100))* 0.70) + ((modinezinc * 0.30)+ (basezpr/100)* 0.30)) ;
                      comexcu=modinecu* 0.70 ;
                       comexzn=(modinezinc  * 0.30);
                   }else
                      if(salloy.indexOf("23000 24000")>0)
                    {
                      price = (((modinecu + (basecpr/100))* 0.85) + ((modinezinc * 0.15)+ (basezpr/100)* 0.15));
                       comexcu=(modinecu* 0.85) ;
                     comexzn=(modinezinc  * 0.15)  ;
                    } else
                    if(salloy.indexOf("22000")>0)
                    {
                       price = (((modinecu + (basecpr/100))* 0.90) + ((modinezinc * 0.10)+ (basezpr/100)* 0.10));
                       comexcu=(modinecu* 0.90) ;
                       comexzn=(modinezinc  * 0.10);

                    } else
                    {
                        out.print("<script>alert('PRMETAL  Missing Modine US metal price. Contact Accounting!!');</script>");
                    }
                }else
                 if(rsShipment.getString("account").equals("MODCAN MODUS ") )
                {
                     if(StringUtils.copper(salloy) )
                    {
                        price = modcancu + (basecpr/100);
                         comexcu=modcancu;
                           comexzn=0.0 ;
                    }else
                     if(salloy.indexOf("26000 27000 27130 26010 26020 26030 26120 26130")>0)
                   {
                       price = (((modcancu + (basecpr/100))* 0.70) + ((modcanzinc * 0.30)+ (basezpr/100)* 0.30)) ;
                        comexcu=modcancu* 0.70;
                           comexzn=(modcanzinc  * 0.30) ;
                   } else
                      if(salloy.indexOf("23000 24000")>0)
                    {
                        price = (((modcancu + (basecpr/100))* 0.85) + ((modcanzinc * 0.15)+ (basezpr/100)* 0.15));

⌨️ 快捷键说明

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