Note on loan delinquencies business Change (as a result of data sheet changes)

Source: Internet
Author: User

The cause of the problem: when filling out the reimbursement form, pop-up borrowing delinquencies, click on the borrowing number, the data source table of the pop-up window is saved in Tex_bill_content, but because the function of this table is not unique, in travel expenses or other places also used, so may cause data errors, It is therefore necessary to deal with the function of borrowing independently, consider using Tbill_loan_pay_temp to complete.


Precautions:

1, from the original tex_bill_content replaced Tbill_loan_pay_temp


2, need to modify the stored procedure P_checkloanpay, there are two to modify

2.1 Delete the original before each run

DELETE from Tbill_loan_pay_temp WHERE [email protected]_id

2.2 When the calculation is complete, write the result to this table

INSERT into Tbill_loan_pay_temp (Billlp_bill,billlp_seq,billlp_strike_user,billlp_curr_amount,billlp_amount) VALUES (@SRS_BILL_ID, 1, @USER_ID, @LOAN_AMOUNT1, @PAY_AMOUNT1)


3, need to fix the view Vex_loan_bill, note that billlp_curr_amount for the amount of borrowing, Billlp_amount for delinquencies amount


ALTER VIEW [dbo]. [Vex_loan_bill]

As

SELECT B.bill_id,b.bill_no,b.bill_remark,b.bill_submit_datetime

, EBC. Billlp_curr_amount as Loan_amount

, EBC. Billlp_amount as Pay_amount

, (EBC. Billlp_curr_amount-ebc. Billlp_amount) as Loan_no_pay_amount

, U.user_id,u.user_code,u.user_name from Tbill_loan_pay_temp EBC

INNER JOIN Tbill B on B.BILL_ID=EBC. Billlp_bill

INNER JOIN TUSER U on U.user_id=b.bill_user


4, need to correspond to modify the template borrowing delinquencies section of the field Billlp_srs_bill of the write-back company, mainly in the view of the corresponding borrowing amount, delinquencies Amount field name changed


Note on loan delinquencies business Change (as a result of data sheet changes)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.