电脑故障

位置:IT落伍者 >> 电脑故障 >> 浏览文章

进销存管理系统销售管理功能的实现(一)[4]


发布日期:2020/1/25
 
——此文章摘自《Delphi 数据库开发经典案例解析》定价特价购买>>http://tracklinktechcn/?m_id=dangdang&a_id=A&l=&l_type= width= height= border= nosave>

//当商品信息数量单价不为空时才能进行计算

if (currentRow<>)and(stringgridCells[currentRow]<>)and(stringgridCells[

currentRow]<>)and(stringgridCells[currentRow]<>)and(stringgridCells[

currentRow]<>) then

begin

//计算某条销售单明细的进货金额税额和不含税额

//这里开始添加的代码是判断出货量的

//销售商品的数量不允许大于库存中的储存数量

adoqueryClose;

adoquerySQLClear;

adoquerySQLAdd(select 库存数量 from 库存库 where 货号

=+stringgridCells[currentRow]+);

adoqueryOpen;

if strtoint(stringgridCells[currentRow])>adoquery

FieldByName(库存数量)AsInteger then

begin

showmessage(该库中此种商品的最大储量小于您的输入将按照最大储量出货);

stringgridCells[currentRow]:=adoqueryFieldByName(库存数量)AsString;

end;

//计算某条销售单明细的进货金额税额和不含税额

number:=strtofloat(stringgridCells[currentRow]);

price:=strtofloat(stringgridCells[currentRow]);

tax:=strtofloat(stringgridCells[currentRow])/;

stringgridCells[currentRow]:=floattostr(number*price);

stringgridCells[currentRow]:=floattostr(tax*number*price/(+tax));

stringgridCells[currentRow]:=floattostr(number*price/(+tax));

right>[http://developcsaicn/delphi/htm>] [http://developcsaicn/delphi/htm>] [http://developcsaicn/delphi/htm>] []

上一篇:机构设置及编码功能的实现(三)

下一篇:进销存管理系统销售管理功能的实现(一)[3]