Update 2026-06-24 10:47:45

This commit is contained in:
yi
2026-06-24 10:47:45 +08:00
parent ffc7eef984
commit 94625d4f3f
29 changed files with 1417 additions and 158 deletions
+3 -3
View File
@@ -372,7 +372,7 @@ router.post('/execute', async (req, res) => {
break;
}
case 'advance': {
const advRow = await db.query('SELECT project_id, applicant_id, applicant, advance_code, purpose FROM advances WHERE id = $1', [source_id]);
const advRow = await db.query('SELECT project_id, applicant_id, applicant, advance_code, reason AS purpose FROM advances WHERE id = $1', [source_id]);
if (advRow.rows.length > 0) {
finProjectId = advRow.rows[0].project_id;
finUserId = advRow.rows[0].applicant_id;
@@ -385,10 +385,10 @@ router.post('/execute', async (req, res) => {
break;
}
case 'reimbursement': {
const reimbRow = await db.query('SELECT project_id, applicant_id, applicant, reimbursement_code, expense_type, description as reimb_desc FROM reimbursements WHERE id = $1', [source_id]);
const reimbRow = await db.query('SELECT project_id, user_id, applicant, reimbursement_code, expense_type, reason AS reimb_desc FROM reimbursements WHERE id = $1', [source_id]);
if (reimbRow.rows.length > 0) {
finProjectId = reimbRow.rows[0].project_id;
finUserId = reimbRow.rows[0].applicant_id;
finUserId = reimbRow.rows[0].user_id;
finUserName = reimbRow.rows[0].applicant;
finSourceCode = reimbRow.rows[0].reimbursement_code;
finDescription = finDescription || reimbRow.rows[0].reimb_desc || '报销';