56,687
社区成员
发帖
与我相关
我的任务
分享
select
`g`.`id` AS `id`,
1 AS `f_type`,
`g`.`bank_account` AS `account`,
-(`g`.`get_money`) AS `money`,
`g`.`get_money_date` AS `money_date`,
`g`.`becuse` AS `becuse`,
`g`.`person` AS `person`,
`g`.`person2` AS `person2`,
`g`.`balance` AS `balance`
from `get_money_log` `g`
union all
select
`ba`.`id` AS `id`,
2 AS `f_type`,
`ba`.`account` AS `account`,
`ba`.`receivable_money` AS `money`,
`ba`.`income_date` AS `money_date`,
`ba`.`note` AS `becuse`,
`ba`.`income_customer` AS `person`,
`ba`.`balance` AS `balance`
from `business_accounts` `ba`
union
select
`bs`.`id` AS `id`,
3 AS `f_type`,
`bs`.`account` AS `account`,
-(`bs`.`pay_already_money`) AS `money`,
`bs`.`pay_date` AS `money_date`,
`bs`.`note` AS `becuse`,
`bs`.`pay_person` AS `person`,
`bs`.`customer_name` AS `person2`,
`bs`.`balance` AS `balance`
from `business_shoud` `bs`