收银系统
脚本系统运维原创收银系统小于 1 分钟约 158 字
1. 支付方式销售
select o.pos_no,t.tender_type_id,t.tender_type_desc, sum((case when o.value_sign='N' then -nvl(o.real_value,o.value_) else nvl(o.real_value,o.value_) end)) sale
from h_t_order o,h_t_order_pay p,mom_tender t
where o.id=p.o_id
and p.tender_type_id=t.tender_type_id
and o.belong_date between 20230101 and 20231231
group by o.pos_no,t.tender_type_id,t.tender_type_desc
2. 收银笔数
select trunc(JYSJ) 日期,
l.SKTNO 款台号,
u.name 姓名,
count(distinct l.SKTNO || l.JLBH) 收银笔数,
count(distinct c.art_no) 商品数量,
sum(c.xsje) 金额
from report.SKTXSJL l, report.SKTXSJLC c,users u
where l.SKTNO = c.SKTNO
and l.JLBH = c.JLBH
and l.SKY=u.user_code(+)
and trunc(JYSJ) between to_date(20200509, 'yyyymmdd') and
to_date(20200531, 'yyyymmdd')
group by trunc(JYSJ), l.SKTNO,u.name;