打款凭证详情.sql 685 B

123456789101112131415161718192021222324
  1. select t1.sa_paybillid,
  2. t1.sys_enterpriseid,
  3. t1.billno,
  4. t1.payer,
  5. t1.paydate,
  6. t1.period,
  7. t1.amount,
  8. t1.status,
  9. t1.remarks,
  10. t1.createby,
  11. t1.createdate,
  12. t1.bank,
  13. t1.bankcardno,
  14. t2.agentnum,
  15. t3.enterprisename,
  16. t3.abbreviation,
  17. t1.inbank,
  18. t1.inbankcardno
  19. from sa_paybill t1
  20. left join sa_agents t2
  21. on t1.siteid = t2.siteid and t1.sys_enterpriseid = t2.sys_enterpriseid
  22. left join sys_enterprise t3 on t1.siteid = t2.siteid and t1.sys_enterpriseid = t3.sys_enterpriseid
  23. where t1.siteid = $siteid$
  24. and t1.sa_paybillid = $sa_paybillid$