IO-1459 DMS Export marks bills as exported.

This commit is contained in:
Patrick Fic
2021-12-14 09:54:46 -08:00
parent 91e70750d6
commit ca846b02e0
3 changed files with 12 additions and 1 deletions

View File

@@ -654,6 +654,10 @@ async function MarkJobExported(socket, jobid) {
successful: true,
useremail: socket.user.email,
},
bill: {
exported: true,
exported_at: new Date(),
},
});
return result;

View File

@@ -1324,6 +1324,10 @@ async function MarkJobExported(socket, jobid) {
successful: true,
useremail: socket.user.email,
},
bill: {
exported: true,
exported_at: new Date(),
},
});
return result;

View File

@@ -1367,7 +1367,7 @@ exports.SET_QBO_AUTH = `mutation SET_QBO_AUTH($email: String!, $qbo_auth: jsonb!
`;
exports.MARK_JOB_EXPORTED = `
mutation MARK_JOB_EXPORTED($jobId: uuid!, $job: jobs_set_input!, $log: exportlog_insert_input!) {
mutation MARK_JOB_EXPORTED($jobId: uuid!, $job: jobs_set_input!, $log: exportlog_insert_input!, $bill: bills_set_input!) {
update_jobs(where: {id: {_eq: $jobId}}, _set: $job) {
returning {
id
@@ -1382,6 +1382,9 @@ mutation MARK_JOB_EXPORTED($jobId: uuid!, $job: jobs_set_input!, $log: exportlog
insert_exportlog_one(object: $log) {
id
}
update_bills(where:{jobid:{_eq :$jobId}}, _set:$bill){
affected_rows
}
}
`;
exports.INSERT_EXPORT_LOG = `