L
longqcc
Unregistered / Unconfirmed
GUEST, unregistred user!
代码:
ItemName :array [0..40] of Char
ItemQuantity :Single
UnitPrice :Single
ItemAmount :Single
Extra1 :array [0..20] of Char
//备用1 end
pPosInvoiceItems=^TPosInvoiceItems
TPosInvoice = record POSID :array [0..2] of Char
TransactionType :Char
TransactionNumber :array [0..10] of Char
TransactionDate :array [0..8] of Char
TransactionTime :array [0..6] of Char
CashierName :array [0..30] of Char
SiteID :array [0..3] of Char
SiteName :array [0..40] of Char
NozzleNum :array [0..4] of Char
ItemCount :Word
//商品项目数量 TotalAmount :Single
//应收金额 InvoiceAmount :Single
//实收金额 DiscountAmount :Single
//优惠金额 Extral1 :array [0..40] of Char
//备用1 Extral2 :array [0..40] of Char
//备用2 Extral3 :array [0..40] of Char
//备用3 ItemsInfo PosInvoiceItems
end
pPosInvoice=^TPosInvoice;function Tax_Invoice(PrtValuePosInvoice):Integer;var Code,S,RetStr:string
CodeLen,CodePos,CodeNum,ItemCount,I:Integer
tmpItemsPosInvoiceItems;begin S:=PChar(@PrtValue^.POSID)
Code:=StrToHexASC(S,'HB',2)
//POS机编号 S:=LStr(PChar(@PrtValue^.TransactionType),1)
Code:=Code+StrToHexASC(S,'HB',1)
//交易类型 S:=PChar(@PrtValue^.TransactionNumber)
Code:=Code+StrToHexASC(S,'HB',10);//交易流水号 S:=PChar(@PrtValue^.TransactionDate)
Code:=Code+StrToHexASC(S,'HB',8)
//打印日期[blue] tmpItems:=PrtValue^.ItemsInfo
for I:=0 to ItemCount-1 do begin S:=PChar(@tmpItems^.ItemCode)
S:=PChar(@PrtValue^.ItemsInfo^.ItemCode)
Code:=Code+StrToHexASC(S,'HB',15)
//商品编码 S:=PChar(@PrtValue^.ItemsInfo^.ItemName)
Code:=Code+StrToHexASC(S,'HB',40)
//商品名称 Code:=Code+IntToHex(Trunc(PrtValue^.ItemsInfo^.ItemQuantity*100),8)
end;[/blue]end;为什么我取不到结构体中的值,请大家帮忙啊!就是红色部份