<-#Sertakan file = ../__ inc/goperation.asp->
<%
DIM INTBILLTOTAL, INTBILLTYPE, INTBILLVALUE, DTATODAY, I, STRBILLCODE
Jumlah REM dari catatan tunggal (kuantitas persiapan)
intbilltotal = request.form (bn)
intbilltotal = tonum (intbilltotal, 10)
intbillType = getOpertype ()
intbillValue = getOpervalue ()
dtatoday = date ()
Rem ################################################### #################################################### ################################################### ##########################
Rem ## Operasi Item
Redup dtabilldate, strbilluser, strbillcheckuser, strbillcontent
Dim CurbillCost, CurbillCostasp, Intcustid, Strcustname, Strpaytype, Inttotalnum
Redup dtabillyear, intbillid, intbillplanid, strbillplannum
REM ## DtabillDate Tanggal tunggal, pengisi formulir Strbilluser, pickup strbillcheckuser, ID tunggal intbillid
REM ## StrbillContent Single Note, Nomor Aliran StrbillCode, Harga Total CurbillCost (JS), CurbillCostasp Total Harga (ASP)
REM ## ID Pelanggan Intcustid, Nama Pelanggan Strcustname, Metode Pembayaran StrpayType, Jumlah Inttotalnum dari Single Lines
REM ## IntBillType Tipe Tunggal, IntBillValue Jenis Single Deskripsi, ID Paket IntBillplanid, Nomor Paket Strbillplannum
Rem ## Tanggal operasi tunggal
dtabillDate = ganti (trim (request.form (billdate)) ,., -)
Jika tidak terisdate (dtabilldate) maka
ouser.gs_addmessage Tanggal tunggal operasi kosong
Kalau tidak
dtabilldate = cdate (dtabilldate)
dtabillyear = tahun (dtabillDate)
If (osys.checkyearout (dtabillyear)) lalu
ouser.gs_addmessage Tanggal tunggal operasi (& dtabillyear &) di luar jangkauan
Akhiri jika
Rem ################################################### #################################################### ################################################### #####################
REM ## Pembatasan Penyimpanan Data
Rem ################################################### #################################################### ################################################### #####################
Akhiri jika
REM ## Form Fover
strbilluser = trim (request.form (billuser) &)
Jika strbilluser = lalu
ouser.gs_addmessage Formulirnya kosong
Akhiri jika
REM ## pickup
strbillCheckUser = trim (request.form (billcheckuser) &)
Jika strbillCheckUser = lalu
ouser.gs_addmessage pemegang pickup kosong
Akhiri jika
Rem ## Kesalahan berputar
ouser.gs_showmessage 1
REM ## Proyek Lainnya
CurbillCost = Tocur (Request.Form (TotalPrice) &, 0)
CurbillCostasp = 0
intcustid = tonum (request.form (custid) &, 0)
strcustname = request.form (custname)
strpaytype = request.form (paytype)
strbillContent = request.form (millcontent)
intbillplanid = tonum (request.form (billplan) &, 0)
strbillplannum = getBillnuber (intbillplanid)
Rem ################################################### #################################################### ################################################### ##########################
Rem ################################################### #################################################### ################################################### ##########################
Rem ## Dapatkan data input pengguna
Redup arrrecordinfo ()
Redup inttempid, curtempprice, curtemptota, curtempcost, curtempaspc
Redup strtempcode, strtempName, strtemppec, strtempunit, inttempout, strtempcontent
REM ## ID Produk Sementara Inttempid, Harga Unit CurtEMPPRICE, Kuantitas Curtemptota, CurtempCost Total Harga (JS)
REM ## Curtempaspc Total Produk Harga (ASP), Kode STRTempCode, Nama StrtempName, Spesifikasi Strtemppec
REM ## Strtempunit Unit, Catatan StrtempCContent
Redim Arrrecordinfo (10, 0)
REM ## Inisialisasi jumlah baris tunggal ke 0, dan filter keluar jumlah baris ke 0
inttotalnum = 0
inttempout = 0
REM ## Inisialisasi data berguna yang dikirimkan oleh klien
Untuk i = 1 ke intbilltotal
inttempid = tonum (request.form (fpid & i), 0)
curtempprice = tocur (request.form (fpprice & i), 0)
CurtemptotaS = Tocur (request.Form (fptotal & i), 0)
CurtempCost = Tocur (Request.Form (FPCOST & I), 0)
Curtempaspc = Curtempprice * Curtemptotal
If ((CurtemppRice> 0) dan (Curtemptota <> 0) dan (inttempid> 0)) lalu
REM ## Data yang Tersedia
inttotalnum = inttotalnum + 1
CurbillCostasp = CurbillCostasp + Curtempaspc
strtempCode = trim (request.form (fpmodel & i))
strtempName = trim (request.form (fpvalue & i))
strtempspec = trim (request.form (fspec & i))
strtempunit = trim (request.form (fpunit & i))
strtempContent = trim (request.form (fpcontent & i))
Redim Preserve Arrrecordinfo (10, Inttotalnum)
arrrecordinfo (0, inttotalnum) = inttempid
arrrecordinfo (1, inttotalnum) = strtempname
arrrecordinfo (2, inttotalnum) = strtempcode
arrrecordinfo (3, inttotalnum) = strtempspec
arrrecordinfo (4, inttotalnum) = strtempunit
arrrecordinfo (5, inttotalnum) = Curtempprice
arrrecordinfo (6, inttotalnum) = Curtemptota
arrrecordinfo (7, inttotalnum) = Curtempcost
arrrecordinfo (8, inttotalnum) = Curtempaspc
arrrecordinfo (9, inttotalnum) = strtempcontent
Elseif (inttempid> 0) lalu
inttempout = inttempout + 1
Akhiri jika
Berikutnya
Jika inttotalnum <1 maka
ouser.gs_addmessage tidak ada data produk dalam pesanan operasi
ouser.gs_addmessage Total & inttempout & data (harga unit produk adalah 0, kosong atau negatif, kuantitasnya 0 atau kosong) disaring
ouser.gs_showmessage 1
Akhiri jika
Rem ################################################### #################################################### ################################################### ##########################
REM ## Buka Koneksi
f__openconn
Rem ################################################### #################################################### ################################################### ##########################
Rem ## Periksa apakah tabel itu ada atau tidak
Redup tbltableName
tbltableName = ouser.getBillTable (dtabillyear)
Rem ################################################### #################################################### ################################################### ##########################
Rem ################################################### #################################################### ################################################### ##########################
REM ## Bangun pernyataan SQL proyek tunggal dan simpan
strbillcode = getopebill ()
SQL = Pilih * dari [& gbl__str_tab_inf_bill &]
Set RS = Server.CreateObject (ADODB.Recordset)
rs.open sql, conn, 1, 3
rs.addnew
RS (customerId) = intcustid
RS (CustomerName) = StrcustName
RS (bitplanid) = intbillplanid
RS (bitplannum) = strbillplannum
RS (bittype) = intbillType
RS (bitname) = IntBillValue
RS (bitcode) = StrbillCode
rs (bitnum) = inttotalnum
RS (bitprice) = CurbillCost
RS (bitpriceasp) = CurbillCostasp
RS (bitdate) = dtabillDate
RS (BitPay) = StrpayType
RS (BitContent) = StrbillContent
RS (FillUser) = Strbilluser
RS (SureUser) = StrbillCheckUser
RS (userid) = ouser.uid
RS (nama pengguna) = ouser.username
rs.update
intbillid = rs (id)
strbillcode = getBillNuber (intbillid)
RS (bitcode) = StrbillCode
rs.update
rs.close
Rem ################################################### #################################################### ################################################### ##########################
Rem ################################################### #################################################### ################################################### ##########################
REM ## Membangun Data Baris SQL Pernyataan dan Menyimpan
Untuk i = 1 ke inttotalnum
sql = masukkan ke [& tbltableName &] & _
(Bittype, BitValue, Bitid, Bitcode, ProductID, ProductName, ProductCode, ProductSpec & _
, ProductUnit, ProductPrice, ProductNum, Pricecount, Priceaspc, Billdate, Content) & _
Nilai (& _
& intbillType & & _
, '& tosqlr (intbillValue) &' & _
, & intbillid & & _
, '& tosqlr (strbillcode) &' & _
, & arrrecordinfo (0, i) & & _
, '& tosqlr (arrrecordinfo (1, i)) &' & _
, '& tosqlr (arrrecordinfo (2, i)) &' & _
, '& tosqlr (arrrecordinfo (3, i)) &' & _
, '& tosqlr (arrrecordinfo (4, i)) &' & _
, & arrrecordinfo (5, i) & & _
, & arrrecordinfo (6, i) & & _
, & arrrecordinfo (7, i) & & _
, & arrrecordinfo (8, i) & & _
, # & dtabillDate & # & _
, '& tosqlr (arrrecordinfo (9, i)) &' & _
)
Conn.execute (SQL)
Berikutnya
Rem ################################################### #################################################### ################################################### ##########################
Rem ## Tutup koneksi
f__closeconn
Rem ################################################### #################################################### ################################################### ##########################
Rem ## Informasi Prompt Output
ouser.gs_addmessage Total & inttempout & data (harga unit produk adalah 0, kosong atau negatif, kuantitasnya 0 atau kosong) disaring
ouser.gs_addmessage Total & inttotalnum & item disimpan dan disimpan dalam database, harga total: & formatNumber (CurbillCost, 2, True) & (& FormatNumber (CurbillCostasp, 2, True) &)
ouser.gs_addmessage melihat daftar ini (& strbillcode &) informasi
ouser.gs_addmessage cetak pesanan ini
ouser.gs_showmessage 0
Rem ################################################### #################################################### ################################################### ##########################
%>