<%
if not isnull(npacking) then
Dim Rsinven1, Rsdetalle,RsInvoice,RsInvoice2
Dim Sqlmir1, sqlmir2, sqlInvoice, sqlInvoice2
linvoice=right("00"&invoice,5)
'response.write("fac "&linvoice)
'response.write(" fec "&fechainicial)
'set Rsinven1=dbsql.execute("select a.good_date, a.good_seq, right(a.good_date,4) + '-' + a.good_seq chul_no, (select cust_nm from stb010t(nolock) where cust_cd = max(a.cust_cd)) cust_nm, case max(a.nap_cd) when '1' then '' else (select nap_nm from stb030t(nolock) where crp_id = '10' and cust_cd = max(a.cust_cd) and nap_cd = max(a.nap_cd)) end nap_nm, max(a.car_info) note, sum(a.oncar_qty) oncar_qty, sum(a.oncar_amt) oncar_amt, max(pack_no) pack_no, (select code_nm from sta010t where major_cd = '9130' and minor_cd = max(a.carry_kind))+''+max(a.car_info) carry_kind, max(chk_tit) chk_tit, (select code_nm from sta010t(nolock) where major_cd = '9015' and minor_cd = max(chk_tit)) chk_tit_nm, max(prt_chk) prt_chk from sal030t a(nolock) where a.pack_no='" & npacking & "') group by a.good_date, a.good_seq order by a.good_date desc, a.good_seq")
Set Rsinven1 = Server.CreateObject("ADODB.RecordSet")
Rsinven1.CursorType = adOpenDynamic
set Rsinven1=dbsql.execute("SELECT sal030t.pack_no, sal030t.oncar_qty as totpiezas, sal030t.oncar_amt as importe, sal020t.*, stb010t.cust_nm, stb010t.addr_1, stb010t.addr_2, stb010t.addr_3, stb010t.tel_no, stb010t.fax_no, stb030t.nap_nm, stb030t.addr_1 AS dir1, stb030t.addr_2 as dir2, stb030t.addr_3 as dir3, stb030t.tel_no as telefono, stb030t.fax_no as faxnum, sta010t.code_nm, (select max(note_5) from sal012t a(nolock) left outer join ( select po_no, count(*) po_cnt from sal020t group by po_no) a1 on a.po_no = a1.po_no where a.po_no = sal020t.po_no ) as note5 " & _
"FROM sal020t LEFT JOIN (((sal030t LEFT JOIN stb010t ON sal030t.cust_cd = stb010t.cust_cd) LEFT JOIN stb030t ON (sal030t.nap_cd = stb030t.nap_cd) AND (sal030t.crp_id = stb030t.crp_id) AND (sal030t.cust_cd = stb030t.cust_cd)) LEFT JOIN sta010t ON sal030t.carry_kind = sta010t.minor_cd) ON sal020t.good_date = sal030t.good_date and (sal020t.goods_class = sal030t.goods_class) AND (sal020t.good_seq = sal030t.good_seq)" & _
"WHERE (((sal030t.pack_no)='" & npacking & "') AND ((sta010t.major_cd)='9130')) order by sal020t.chul_sub, sal020t.po_no, sal020t.good_nm, sal020t.desc_1")
'a.chul_date, a.chul_seq, a.chul_sub, a.po_no, b.cust_cd, c.good_cd, b.item
'sal020t.pack_no = sal030t.pack_no
'and a.good_date between :as_fm_date and :as_to_date and a.pack_no like '" & invoice & "'
'a.good_date='20150515'
lyear=mid(Rsinven1("good_date"),1,4)
lmonth=mid(Rsinven1("good_date"),5,2)
lday=mid(Rsinven1("good_date"),7,2)
ldate=lmonth+"/"+lday+"/"+lyear
%>
Sinil Industry S.A de C.V. Blvd.Pacifico No 14666 Parque Industrial
Pacifico Tijuana B.C. Mexico C.P 22643
R.F.C.:SIN070427620 // IMMEX:321-2007
SHINWOO P&C USA INC.
2177 BRITANNIA BLVD., SUITE # 203
SAN DIEGO, CA 92154
SCS-COC-007144
DATE
<%=ldate & "-" & Rsinven1("good_seq")%>
PACKING NO.
<%=npacking%>
IVA
VENDIDO A/BILL TO:
<%=Rsinven1("cust_nm")%>
<%=Rsinven1("addr_1")%>
<%=Rsinven1("addr_2")%>
<%=Rsinven1("addr_3")%>
Tel:<%=Rsinven1("tel_no")%> Fax:<%=Rsinven1("fax_no")%>
ENTREGADO A/SHIP TO: <%=Rsinven1("nap_nm")%>
<%=Rsinven1("dir1")%>
<%=Rsinven1("dir2")%>
<%=Rsinven1("dir3")%>
Tel:<%=Rsinven1("telefono")%> Fax:<%=Rsinven1("faxnum")%>
<%
Do While Not Rsinven1.EOF
lpedimen =Rsinven1("note5")
Rsinven1.MoveNext
Loop
'if not Rsinven1.EOF then
' Rsinven1.Movelast
'end if
%>
No. De PEDIMENTO
<%=lpedimen%>
IMMEX
R.F.C.
ITEM
NO DE PARTE
DESCRIPTION DESCRIPCION
ORDER NO NO DE ORDEN
PALLET
TARIMA
QUANTITY
CANTIDAD
Sales Price Precio Venta
Sales Amt Importe
<%
Rsinven1.MoveFirst
Do While Not Rsinven1.EOF
if Rsinven1("good_nm")="BN69-18428A-01 FM" then
ldescrip=Rsinven1("desc_1")&" FSC MIX 70% SCS-COC-001744"
else
ldescrip=Rsinven1("desc_1")
end if
%>
<%
Do While lnumrenglon<10
%>
<%
lnumrenglon=lnumrenglon+1
loop
%>
SOLO AQUELLOS ARTICULOS IDENTIFICADOS COMO TAL, SON CERTIFICADOS FSC®
COMMENT / COMENTARIO
<%=lnota1%>
<%=lnota2%>
NOTE: Customer shall verify contents of shipment upon receipt and notify to vendor inmediately of any discrepancy no claims will be allowed
unless made within 30 days of receipt of goods.
In case of freight is placed by address, they will be responsible of the final destination of the goods.
NOTA: Cliente debera comprobar el contenido del envio previa recepcion y notificar al proveedor inmediatamente de cualquier discrepancia,
no se aceptara reclamos a menos que dentro de los 30 dias siguientes a la recepcion de mercancias.
En caso de que el flete sea puesto por el destinatario, se hacen responsables del destino final de las mercancias.