您的当前位置:首页正文

采购发票

2024-02-12 来源:布克知识网


SELECT sbalno, lineid, srcvno, srtnno, invno, pinvno, rinvno, rpinvno, um_conv, msunit, curstyle, exgrate, itemno, batchno, balqty, ranks, fc_invbalsum,

invbalsum, fc_tempsum, tempsum, taxrate, hlshqty, uhlshqty, fc_uhlshsum, uhlshsum, def_num1, def_num2, def_num3, def_num4, def_str1, def_str2,

def_str3, def_str4, def_date1, def_date2, def_int1, def_int2, def_int3, def_int4, msunit_a, qty_a, hlshqty_a, uhlshqty_a, tr_proj FROM baldet

WHERE (srcvno = '1012020233')

存放采购发票的表头balmst,表体baldet srcvno是入库单通知编号

update billbody set crossflg='1', balqty=10200.000000, balsum=2737.68 where transid ='1012020233' and lineid=3 billbody表中 crossflg对账标志 balqty对账数量 balsum对账金额 transid流水号

lineid 序号(行数,有多少条物料编码(数据)的意思)

这里有三个编码

对三个编码分别做了一个修改的动作 不过系统只认定最后一个发票号。

SELECT sbalno, lineid, srcvno, srtnno, invno, pinvno, rinvno, rpinvno, um_conv, msunit, curstyle, exgrate, itemno, batchno, balqty, ranks, fc_invbalsum,

invbalsum, fc_tempsum, tempsum, taxrate, hlshqty, uhlshqty, fc_uhlshsum, uhlshsum, def_num1, def_num2, def_num3, def_num4, def_str1, def_str2,

def_str3, def_str4, def_date1, def_date2, def_int1, def_int2, def_int3, def_int4, msunit_a, qty_a, hlshqty_a, uhlshqty_a, tr_proj FROM baldet

WHERE (srcvno = '1012020233')

SELECT sbalno, lineid, srcvno, srtnno, invno, pinvno, rinvno, rpinvno, um_conv, msunit, curstyle, exgrate, itemno, batchno, balqty, ranks, fc_invbalsum,

invbalsum, fc_tempsum, tempsum, taxrate, hlshqty, uhlshqty, fc_uhlshsum, uhlshsum, def_num1, def_num2, def_num3, def_num4, def_str1, def_str2,

def_str3, def_str4, def_date1, def_date2, def_int1, def_int2, def_int3, def_int4, msunit_a, qty_a, hlshqty_a, uhlshqty_a, tr_proj FROM baldet

WHERE (invno = ' 1012090001')

这里没有记录显示

可以得出:一个入库单号,只有一个发票号有效。 不过却能在invdet这个表中查到

SELECT invno, lineid, itemno, msunit, invqty, invprc, invsum, taxrate, taxsum, prctaxsum, remarks, curstyle, exgrate, def_int1, def_int2, def_date1, def_date2,

def_str1, def_str2, def_str3, def_num1, def_num2, def_num3, def_num4, def_num5, fc_invsum, fc_taxsum, fc_prctaxsum, transum, otrsum, fc_transum,

fc_otrsum, crossflg, um_conv, crossqty, fc_crosssum, crosssum, hlshqty, uhlshqty, fc_uhlshsum, uhlshsum, ranks, def_int3, def_int4, def_str4,

msunit_a, qty_a, crossqty_a, hlshqty_a, uhlshqty_a, tr_proj, fc_hlshsum, hlshsum, concode, conlineid, conplanno, reltype, purno, inv_fee FROM invdet

WHERE (invno = 'M1012090001')

SELECT invno, pinvno, invdt, purno, correl_no, invtype, invstatus, invcomp, vndcomp, bank, accountno, payway, taxno, deptno, empno, transum, cavsum,

cavflg, paysum, otrsum, remarks, prctaxsum, taxsum, untaxsum, fillpsn, checkpsn, checkflg, vcrflg, vcrno, crossflg, iscancell, cclpsn, concflag,

def_int1, def_int2, def_int3, def_int4, def_date1, def_date2, def_str1, def_str2, def_str3, def_str4, def_num1, def_num2, def_num3, def_num4,

fc_transum, fc_cavsum, fc_paysum, fc_otrsum, fc_prctaxsum, fc_taxsum, fc_untaxsum, fc_cavflg, curstyle, exgrate, transkm, otherkm, vcrtype, vcrdt,

fc_discsum, discsum, exapsn, exaflg, purcharge, fc_crosssum, crosssum, fc_uhlshsum, uhlshsum, invflg, taxrate, jsflflg, isdetail, taxtype, fintype,

tr_proj, fc_hlshsum, hlshsum, comptemp_id, ocode, petitionflag, petition_sum, backfee_flg FROM invmst

WHERE (invno = 'M1012090001') 在invmst这张表中也能查找的到

对账标志显示的是0

新的入库单号

SELECT crossflg, balqty, balsum, transid, lineid, billno, itemno, ranks, goodsname, whlocation, batchno, qty, useqty, simqty, prc, mony, tax, tranmony,

othmony, plnmony, usemony, simmony, remarks, relrow, refbill, refrow, actiflg, def_num1, def_num2, def_num3, def_num4, def_num5, def_num6,

def_num7, def_num8, def_num9, def_num10, def_str1, def_str2, def_str3, def_date1, def_date2, def_int1, def_int2, msunit, um_conv, exes1, exes2,

exes3, exes4, exes5, exes6, exes7, exes8, exes9, exes10, exes11, exes12, useexes1, useexes2, useexes3, useexes4, useexes5, useexes6,

useexes7, useexes8, useexes9, useexes10, useexes11, useexes12, def_int3, def_int4, msunit_a, qty_a, itemcode, objectno, costbatchno, centerno,

balqty AS Expr2, balsum AS Expr3, hlshsum, hlshqty, crossflg AS Expr1, tr_proj, concode, conlineid, po_cavsum, fc_po_cavsum, po_cavflg, joinbill,

joinrow, waterlate, chklate, avgchklate, thisprc, ac_outid, petition_flag, srecno, srecrow, dacode, reltype, relno, relno2, relrow2, um_conv_a,

um_conv_am, petition_code, ina_balqty, sortid, attrvalid, relno3, petition_sum

FROM billbody

WHERE (transid = '1012030073')

现在开始做发票对账

现在没有了找不到1012030073这张单据了

继续测试

对账,开发票前

再次查询billbody这张表

已经对账完毕找不到了

这些都是发票没有开成功的,也就是只有发票号,没有成功对账的。 SELECT crossflg, balqty, balsum, * FROM billbody WHERE (crossflg = 0) ORDER BY transid

总的结论没有能对上帐没有跟billbody表中的对上

解决方案,如果还出现自己做过的单的流水号,则自己手动对下然后再查看

让我执行下面的代码检查

SELECT crossflg, balqty, balsum, transid, lineid, billno, itemno FROM billbody WHERE (crossflg = 0) ORDER BY transid

因为我们就这么一辈子,几十年的光景,无法重来,开心也好,不开心也罢,怎么都是活着,那么何不让自己开开心心的过好每一天呢! 生活虽辛苦,但我们一定要笑着过,以积极乐观的心态让日子过得有滋有味,这样才不白来人世走一遭,才会无怨无悔。 因为生活没有真正的完美,只有不完美才是最真实的美。

因篇幅问题不能全部显示,请点此查看更多更全内容

Top