is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, (cast(confirm_income_amount as decimal(18,2))) as confirm_income_amount,
is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, (cast(confirm_income_amount as decimal(18,2))) as confirm_income_amount,
amount_state_unid, to_char(start_guarantee_date, 'yyyy-MM-dd') as start_guarantee_date, to_char(end_guarantee_date, 'yyyy-MM-dd') as end_guarantee_date,
amount_state_unid, to_char(start_guarantee_date, 'yyyy-MM-dd') as start_guarantee_date, to_char(end_guarantee_date, 'yyyy-MM-dd') as end_guarantee_date,
<!-- cast(confirm_income_amount as decimal(18,2)) as confirm_income_amount, -->
<!-- cast(confirm_income_amount as decimal(18,2)) as confirm_income_amount, -->
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100001') as advance_pay_proporition,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100001') as advance_pay_proporition,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100002') as arrive_pay_proportion,
(SELECT tb_payment_agree.payment_propority FROM tb_payment_agree WHERE tb_payment_agree.contract_unid = tb_contract.contract_unid AND tb_payment_agree.payment_type = '100002') as arrive_pay_proportion,