<-#รวมไฟล์ = ../__ inc/goperation.asp->
-
สลัว intbilltotal, intbilltype, intbillvalue, dtatoday, i, strbillcode
หมายเลข REM ของระเบียนเดี่ยว (ปริมาณการเตรียม)
intBillTotal = request.form (bn)
intbilltotal = tonum (intbilltotal, 10)
intbillType = getOperType ()
intbillValue = getOpervalue ()
dtatoday = วันที่ ()
rem ################################################################## ######################################################################### ################################################################### ################################
rem ## รายการการดำเนินการ
Dim Dtabilldate, Strbilluser, Strbillcheckuser, Strbillcontent
Dim Curbillcost, Curbillcostasp, intcustid, strcustname, strpaytype, inttotalnum
Dim Dtabillyear, intbillid, intbillplanid, strbillplannum
rem ## dtabilldate วันที่เดี่ยว, ฟิลเลอร์ฟอร์ม strbilluser, pickup strbillcheckuser, intbillid id single id
REM ## Note Single Strbillcontent หมายเลข Flow Strbillcode, Curbillcost ราคารวม (JS), Curbillcostasp ราคารวม (ASP)
rem ## รหัสลูกค้า intcustid, ชื่อลูกค้า strcustname, วิธีการชำระเงิน strpaytype, จำนวน inttotalnum ของบรรทัดเดียว
rem ## intbilltype ประเภทเดียว, intbillvalue คำอธิบายประเภทเดียว, ID แผน intbillplanid, หมายเลขแผน strbillplannum
rem ## วันที่ดำเนินการเดี่ยว
dtabilldate = แทนที่ (trim (request.form (billdate)),., -)
ถ้าไม่ใช่ isdate (dtabilldate) แล้ว
OUSER.GS_ADDMESSAGE วันที่เดียวของการดำเนินการว่างเปล่า
อื่น
dtabilldate = cdate (dtabilldate)
dtabillyear = ปี (dtabilldate)
ถ้า (osys.checkyearout (dtabillyear)) แล้ว
OUSER.GS_ADDMESSAGE วันที่เดียวของการดำเนินการ (& dtabillyear &) นอกช่วง
สิ้นสุดถ้า
rem ################################################################## ######################################################################### ################################################################### ############################
REM ## ข้อ จำกัด การจัดเก็บข้อมูล
rem ################################################################## ######################################################################### ################################################################### ############################
สิ้นสุดถ้า
Rem ## Form Filler
strbilluser = trim (request.form (billuser) &)
ถ้า strbilluser = จากนั้น
OUSER.GS_ADDMESSAGE ฟอร์มว่างเปล่า
สิ้นสุดถ้า
rem ## รับ
strbillcheckuser = trim (request.form (billcheckuser) &)
ถ้า strbillcheckuser = ดังนั้น
OUSER.GS_ADDMESSAGE ที่ถือรถปิคอัพว่างเปล่า
สิ้นสุดถ้า
rem ## ข้อผิดพลาดการพลิก
OUSER.GS_SHOWMESSAGE 1
Rem ## โครงการอื่น ๆ
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 (billcontent)
intBillPlanid = tonum (request.form (billplan) &, 0)
strbillplannum = getBillNuber (intbillplanid)
rem ################################################################## ######################################################################### ################################################################### ################################
rem ################################################################## ######################################################################### ################################################################### ################################
rem ## รับข้อมูลอินพุตของผู้ใช้
dim arrecordinfo ()
สลัว inttempid, curtempprice, curtemptotal, curtempcost, curtempaspc
Dim strtempcode, strtempname, strtempspec, strtempunit, inttempout, strtempcontent
REM ## ID ID ผลิตภัณฑ์ชั่วคราว inttempid, ราคาหน่วย CURTEMPPRICE, ปริมาณผ้าม่าน, CURTEMPCOST ราคารวม (JS)
REM ## CURTEMPASPC ราคาผลิตภัณฑ์ทั้งหมด (ASP), รหัส strTempCode, ชื่อ strTempName, ข้อมูลจำเพาะ strtempspec
rem ## strtempunit unit, strtempcontent notes
Redim arrecordinfo (10, 0)
rem ## เริ่มต้นจำนวนแถวเดี่ยวเป็น 0 และกรองจำนวนแถวเป็น 0
inttotalnum = 0
inttemPout = 0
rem ## เริ่มต้นข้อมูลที่เป็นประโยชน์ที่ส่งโดยลูกค้า
สำหรับ i = 1 ถึง intbilltotal
inttempid = tonum (request.form (fpid & i), 0)
CURTEMPPRICE = TOCUR (request.Form (fPPrice & i), 0)
curtemptotal = tocur (request.form (fptotal & i), 0)
CURETEMPCOST = TOCUR (request.Form (fpcost & i), 0)
CURTEMPASPC = CURTEMPPRICE * CURTEMPOTAL
if ((crechempprice> 0) และ (curtemptotal <> 0) และ (inttempid> 0)) จากนั้น
REM ## ข้อมูลที่มีอยู่
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 arrecordinfo (10, inttotalnum)
arrecordinfo (0, inttotalnum) = inttempid
arrecordinfo (1, inttotalnum) = strtempname
arrecordinfo (2, inttotalnum) = strtempcode
arrecordinfo (3, inttotalnum) = strtempspec
arrecordinfo (4, inttotalnum) = strtempunit
arrecordinfo (5, inttotalnum) = curtempprice
arrecordinfo (6, inttotalnum) = curtemptotal
arrecordinfo (7, inttotalnum) = curtempcost
arrecordinfo (8, inttotalnum) = curtempaspc
arrecordinfo (9, inttotalnum) = strtempContent
elseif (inttempid> 0) จากนั้น
inttempout = inttempout + 1
สิ้นสุดถ้า
ต่อไป
ถ้า inttotalnum <1 แล้ว
OUSER.GS_ADDMESSAGE ไม่มีข้อมูลผลิตภัณฑ์ในลำดับการดำเนินการ
OUSER.GS_ADDMESSAGE ทั้งหมด & inttempout & data (ราคาหน่วยผลิตภัณฑ์คือ 0, ว่างหรือลบ, ปริมาณคือ 0 หรือว่าง) จะถูกกรอง
OUSER.GS_SHOWMESSAGE 1
สิ้นสุดถ้า
rem ################################################################## ######################################################################### ################################################################### ################################
rem ## เปิดการเชื่อมต่อ
f__openconn
rem ################################################################## ######################################################################### ################################################################### ################################
rem ## ตรวจสอบว่าตารางมีอยู่หรือไม่
dim tbltablename
tblTableName = OUSER.GETBILLTABLE (DTABILLYEAR)
rem ################################################################## ######################################################################### ################################################################### ################################
rem ################################################################## ######################################################################### ################################################################### ################################
rem ## สร้างคำสั่ง SQL โครงการเดียวและบันทึกไว้
strbillCode = getOpebill ()
sql = select * จาก [& gbl__str_tab_inf_bill &]
ตั้งค่า 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) = olser.uid
RS (ชื่อผู้ใช้) = OUSER.USERNAME
Rs.update
intbillid = rs (id)
strbillCode = getBillNuber (intbillid)
RS (BitCode) = strbillcode
Rs.update
Rs.close
rem ################################################################## ######################################################################### ################################################################### ################################
rem ################################################################## ######################################################################### ################################################################### ################################
REM ## สร้างคำสั่ง SQL ROW DATA
สำหรับ i = 1 ถึง inttotalnum
sql = แทรกลงใน [& tbltablename &] & _
(Bittype, BitValue, BitID, BitCode, ProductId, ProductName, ProductCode, ProductsPec & _
, ProductUnit, Productions, ProductNum, Pricecount, Priceaspc, Billdate, เนื้อหา) & _
ค่า (& _
& intbilltype & _
, '& tosqlr (intbillvalue) &' & _
, & intbillid & _
, '& tosqlr (strbillcode) &' & _
, & arrecordinfo (0, i) & _
, '& tosqlr (arrecordinfo (1, i)) &' & _
, '& tosqlr (arrecordinfo (2, i)) &' & _
, '& tosqlr (arrecordinfo (3, i)) &' & _
, '& tosqlr (arrecordinfo (4, i)) &' & _
, & arrecordinfo (5, i) & & _
, & arrecordinfo (6, i) & _
, & arrecordinfo (7, i) & & _
, & arrecordinfo (8, i) & & _
, # & dtabilldate & # & _
, '& tosqlr (arrecordinfo (9, i)) &' & _
-
conn.execute (SQL)
ต่อไป
rem ################################################################## ######################################################################### ################################################################### ################################
rem ## ปิดการเชื่อมต่อ
f__closeconn
rem ################################################################## ######################################################################### ################################################################### ################################
Rem ## ข้อมูลพรอมต์เอาต์พุต
OUSER.GS_ADDMESSAGE ทั้งหมด & inttempout & data (ราคาหน่วยผลิตภัณฑ์คือ 0, ว่างหรือลบ, ปริมาณคือ 0 หรือว่าง) จะถูกกรอง
OUSER.GS_ADDMESSAGE ทั้งหมด & inttotalnum & รายการจะถูกบันทึกและเก็บไว้ในฐานข้อมูลราคารวม: & formatNumber (curbillcost, 2, true) & (& formatNumber (curbillCostasp, 2, true) &) &)
ouser.gs_addmessage ดูรายการนี้ (& strbillcode &) ข้อมูล
OUSER.GS_ADDMESSAGE พิมพ์คำสั่งนี้
OUSER.GS_SHOWMESSAGE 0
rem ################################################################## ######################################################################### ################################################################### #################################
-