这是收银表单 录入完毕按钮的click代码,红色为报错部分,数据类型不匹配
set talk off
select kc
set order to spdm_kc
select xs1
go top
do while ! eof() select kc seek xs1.商品代码 replace 库存 with 库存-xs1.销售数量 select xs1 skip
enddo
select xs
append from xs1
replace all 员工代码 with dm for alltrim(员工代码)=""
select xs1
sum 销售价格*销售数量 to y
y=str(y,8,2)
=messagebox(y+"元!",0,"本次消费合计:")
delete all
thisform.refresh