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

📄 print.jsp

📁 财务说明的管理
💻 JSP
📖 第 1 页 / 共 3 页
字号:
<%@ page import="com.hexiesoft.utils.StringUtils"%>
<%@ page contentType="text/html; charset=GBK" %>
<%@ include file="/IncludeBeginMD.jsp" %>
<%
    String BOL=DataConvert.toRealString(iPostChange,CurPage.getParameter("BOL"));
    String BLNO=DataConvert.toRealString(iPostChange,CurPage.getParameter("BLNO"));
    String Invoice=DataConvert.toRealString(iPostChange,CurPage.getParameter("Invoice"));
    String PackList=DataConvert.toRealString(iPostChange,CurPage.getParameter("PackList"));
    String Certificate=DataConvert.toRealString(iPostChange,CurPage.getParameter("Certificate"));
    String wantworks=DataConvert.toRealString(iPostChange,CurPage.getParameter("wantworks"));
       out.print("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
    %>
 <html>
 <head></head>

<script type="text/javascript " >
function ToExcel()
        {
              OpenComp("Billing", "/Billing/printBOL/Excel.jsp", "wantworks=<%=wantworks%>&Certificate=<%=Certificate%>&PackList=<%=PackList%>&Invoice=<%=Invoice%>&BOL=<%=BOL%>&BLNO=<%=BLNO%>&rand=" + randomNumber(), "right", "");
             self.returnValue = "OK";
    self.close();
        }
</script>
 <body  bgcolor='#DCDCDC'>


<%


    if(!BOL.equals("")  )
    {


    String  cAdd1="";
    String   cCity=""   ;
    String cPcode="";
    String country="";
    String  shipdt="";
    String  carrier="";
    String  shname="";
    String ordertype="";
    String  shadd1="";
    String  shadd2="";
     String  shadd3="";
     String  shadd4="";
      String  route="";
    String   declared   ="";
     String   currency   ="";
  String   verifyby    ="";
    double copnotes  =0;
 double copweight   =0;
    double copfoil   =0;
 double copFweight    =0;
     double copstrip    =0;
      double copSweight     =0;
     String   alloy    ="";
  String   bstrip     ="";
     double branotes       =0;
      double braweight        =0;
  double braFoil        =0;
      double braFweight         =0;
  double brastrip         =0;
  double braSweight          =0;
    boolean nextline =false;
      String   cweight     ="";
        double   notes     =0;
  String   gross      ="";
    String cName="WOLVERINE RATCLIFFS INC.";
    String cProvst="ONTARIO";
    ASResultSet  rs=Sqlca.getASResultSet("select * from invoice where blno=" + BLNO);

    if(rs.next() )
    {
        if(rs.getString("plant").equals("FERG"))
        {
              cAdd1="865 GARTSHORE STREET";
               cCity="FERGUS"    ;
            cPcode="N1M 2W7"   ;
        }
        else
        {
            cAdd1="10537 YONGE STREET"   ;
           cCity="RICHMOND HILL" ;
            cPcode="L4C 3C5" ;
        }
        carrier=rs.getString("carrier");
        shadd1=rs.getString("shadd1");
        shadd2=rs.getString("shadd2");
         shadd3=rs.getString("shadd3");
        shadd4=rs.getString("shadd4");
        route=rs.getString("route");
         declared   =rs.getString("declared");
        currency =rs.getString("declared");
        verifyby  =rs.getString("verifyby");
           gross =rs.getString("gross");
    }
    else
    {
        out.print("<script>alert('No shipment records to print');</script>");

    }


    //what country is customer from?

    ASResultSet rsc=Sqlca.getASResultSet("select * from customer where account='" + rs.getString("account") + "' and subacct='" +rs.getString("subacct") + "'");
    if(rsc.next() )
    {
           country=rsc.getString("country");
        shname=rsc.getString("shname");
    }
   //  * page header

    ASResultSet  rss=Sqlca.getASResultSet("select * from shipment where blno=" + BLNO);
    if(rss.next() )
    {
         shipdt=rss.getString("shipdt");
        ordertype=rss.getString("ordertype");
              alloy   =rss.getString("alloy");
             notes =  rss.getDouble("notes");


         if(StringUtils.copper(alloy))
         {
             copnotes  =copnotes  +notes;
             copweight =copweight +rss.getDouble("loaded")*(-1);
             if(rss.getString("hscode").compareTo("7410.11.0000") ==0)
             {
                  copfoil  =copfoil  +notes;
                 copFweight  =copFweight  +rss.getDouble("loaded")*(-1);
             }
             else
             {
                copstrip  =copstrip  +notes;
                    copSweight   =copSweight   +rss.getDouble("loaded")*(-1);

             }
         }else
         {
              if(StringUtils.nickel(alloy) )
              {
                   bstrip ="NICKEL SILVER";
              }
             if(StringUtils.phos(alloy))
             {
                  bstrip="PHOS BRONZE";
             }
             if(StringUtils.brass(alloy))
             {
                  bstrip="BRASS STRIP";
             }
              branotes    =branotes    +notes;
              braweight    =braweight    +rss.getDouble("loaded")*(-1);
            if(rss.getString("hscode").compareTo("7410.12.0030") ==0)
             {
                braFoil    =braFoil    +notes;
              braFweight     =braFweight     +rss.getDouble("loaded")*(-1);
             }else
            {
                brastrip    =brastrip    +notes;
              braSweight      =braSweight      +rss.getDouble("loaded")*(-1);
            }
         }
        cweight     =(rss.getString("islbs") =="0")?"LBS":"KGS";


    }

    for (int i=0;i<Integer.parseInt( (BOL=="")?"0":BOL);i++)
    {


        out.print(" <table bgcolor='#DCDCDC'>");
    out.print("<tr><td>" + BLNO  +"</td></tr>");
    out.print("<tr><td>" + shipdt.substring(0,10)  +"</td><td>" + carrier  +"</td></tr>");
    out.print("<tr><td>" + cName  +"</td><td>" + shname  +"</td></tr>");

    if(!ordertype .equals("REG"))
    {
        out.print("<tr><td>VIA:" + shname  +"</td></tr>");
    }
    out.print("<tr><td>" + StringUtils.nullToEmpty(cAdd1)   +"</td><td>" + StringUtils.nullToEmpty(shadd1)   +"</td></tr>");
    out.print("<tr><td>" + StringUtils.nullToEmpty(cCity)   +"," + StringUtils.nullToEmpty(cProvst)   +"  CANADA</td></tr>");

    out.print("<tr><td>" + StringUtils.nullToEmpty(shadd2) + " " + StringUtils.nullToEmpty(shadd3) + "  " + StringUtils.nullToEmpty(shadd4)  +"</td></tr>");
    out.print("<tr><td>" + route  +"</td></tr>");
    if(country=="U")
    {
      out.print("<tr><td> PBB GROUP </td></tr>");
    }
    out.print("<tr><td>" + declared     +"</td></tr>");
    if(currency=="CA")
    {
        out.print("<tr><td> CDN </td></tr>");
    }
    if(currency=="US")
    {
        out.print("<tr><td> USA </td></tr>");
    }
     if(currency=="UK")
    {
        out.print("<tr><td> STERLING </td></tr>");
    }
     if(currency=="EU")
    {
        out.print("<tr><td> EUROS </td></tr>");
    }
     if(verifyby =="PROFORMA")
    {
        out.print("<tr><td> PROFORMA </td></tr>");
    }
    if(copstrip > 0 )
    {
         out.print("<tr><td>" + copstrip     +"</td></tr>");
            out.print("<tr><td> COPPER STRIP </td></tr>");
        out.print("<tr><td>" + copSweight     +"</td><td>" + cweight     +"</td></tr>");
        nextline =true;
    }
     if(copfoil  > 0 )
    {
        if(nextline)
        {
             nextline =false;
        }
        out.print("<tr><td>" + copfoil     +"</td></tr>");
         out.print("<tr><td>COPPER FOIL </td></tr>");
         out.print("<tr><td>" + copFweight     +"</td><td>" + cweight     +"</td></tr>");
         nextline =true;
    }
  if(branotes   > 0 )
    {
        if(nextline)
        {
             nextline =false;
        }
        if(brastrip    > 0 )
          {
            out.print("<tr><td>" + brastrip     +"</td></tr>");
          out.print("<tr><td>" + bstrip     +"</td></tr>");
             out.print("<tr><td>" + braSweight     +"</td><td>" + cweight     +"</td></tr>");
               nextline =true;
          }
         if(braFoil     > 0 )
         {
               if(nextline)
               {
                    nextline =false;
                 }
                out.print("<tr><td>" + braFoil     +"</td></tr>");
                out.print("<tr><td> BRASS FOIL </td></tr>");
              out.print("<tr><td>" + braFweight     +"</td><td>" + cweight     +"</td></tr>");
         }
    }
out.print("<tr><td>" + braFoil     +"</td></tr>");
        out.print("<tr><td>" + gross      +"</td><td>" + cweight     +"</td></tr>");
     out.print("<tr><td> TO BE PREPAID </td></tr>");
      out.print("<tr><td> ALL LOADS MUST BE BLOCKED </td></tr>");
out.print("<tr><td> WOLVERINE </td><td>" + carrier     +"</td></tr>");

         out.print("<tr> <td></td></tr>");
         out.print("<tr> <td></td></tr>");
          out.print("</table>");

   }
    }
%>




<%           out.print("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
    if(!Invoice.equals("")||Invoice!="" )
    {


        String cnconame="";
        String  cName="";
        String  cCity="";
        String cProvst="";
        String  cTraffic="";
        double  gstrate=0;
        String  wght ="";
        String  ordertype ="";
        boolean  to_whouse=false;
        boolean  from_whouse=false;
         String  wblno ="";
        String  ttblno ="";
        String  prevcustpo ="";
        double  prevnet =0;
        String  posort ="";
          String  coils ="";
        double nPOnet=0;
        double nPOinv     =0;
        String  invgst ="";
            double nGST     =0;
        String custpo="";
        String alloy="";
        String contract="";
          String islbs="";
        String invunit="";
         String canlbspr="";
        double invextend=0;
           String isimperial="";
 String DESC="";
String mt_width="";
        String mt_gauge="";
  String custprod="";
  String country ="";
         String hscode ="";
          String cfoil ="";
          String oalloy ="";
         String account ="";
    String STATUS  ="";
           String prepaid  ="";
  String collect  ="";
  String otherfees  ="";
 String reason1  ="";
    String reason2  ="";
  double totherfees=0;
          String sundry  ="";
 double tsundry=0;
  String freight  ="";
       String subtot    ="";
 String invamt     ="";
       boolean   print_invamt=false;
         String fsurcharge     ="";
   String fsurrate      ="";
  String gross       ="";
         String shname       ="";
        String cwh       ="";
  String shadd1       ="";
          String shadd2       ="";
           String shadd3       ="";
         String shadd4       ="";
             String plant       ="";
         double amount=0;
         double frins=0;
         double insurance=0;
  double duty=0;
         double frsubtot=0;
  String verifyby       ="";


        ASResultSet rsI=Sqlca.getASResultSet("select * from global ");
        if(rsI.next() )
        {
         cnconame=rsI.getString("cnconame");
         cCity=rsI.getString("cncity");
         cProvst=rsI.getString("cnprovst");
            cTraffic=rsI.getString("traffic");
        gstrate=rsI.getDouble("gstrate") ;
        }
         ASResultSet rsIs=Sqlca.getASResultSet("select * from shipment where blno= '"+ BLNO+"'");
        if(rsIs.next() )
        {
              wght =rsIs.getString("islbs")=="0"?"LBS":"KGS";
              alloy=rsIs.getString("alloy");
            ordertype=rsIs.getString("ordertype");
            wblno=rsIs.getString("wblno");
            islbs=rsIs.getString("islbs");
            if(ordertype=="REG")
            {
                  to_whouse=false;
                  from_whouse=false;
            } else
            if(ordertype!="REG" && wblno==null)
            {
                  to_whouse=true;

⌨️ 快捷键说明

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