IO-3515 Minimally functional form fill out.
This commit is contained in:
@@ -70,7 +70,7 @@ async function handleBillOcr(request, response) {
|
||||
response.status(200).send({
|
||||
success: true,
|
||||
status: 'COMPLETED',
|
||||
data: await generateBillFormData({ processedData: null, jobid, bodyshopid, partsorderid }), //This is broken if the processedData is not overwritten in the function for testing.
|
||||
data: await generateBillFormData({ processedData: null, jobid, bodyshopid, partsorderid, req: request }), //This is broken if the processedData is not overwritten in the function for testing.
|
||||
message: 'Invoice processing completed'
|
||||
});
|
||||
return;
|
||||
@@ -84,7 +84,7 @@ async function handleBillOcr(request, response) {
|
||||
if (fileType === 'image') {
|
||||
console.log('Image => 1 page, processing synchronously');
|
||||
const processedData = await processSinglePageDocument(uploadedFile.buffer);
|
||||
const billForm = await generateBillFormData({ processedData: processedData, jobid, bodyshopid, partsorderid });
|
||||
const billForm = await generateBillFormData({ processedData: processedData, jobid, bodyshopid, partsorderid, req: request });
|
||||
response.status(200).send({
|
||||
success: true,
|
||||
status: 'COMPLETED',
|
||||
@@ -100,7 +100,7 @@ async function handleBillOcr(request, response) {
|
||||
// Process synchronously for single-page documents
|
||||
console.log('PDF => 1 page, processing synchronously');
|
||||
const processedData = await processSinglePageDocument(uploadedFile.buffer);
|
||||
const billForm = await generateBillFormData({ processedData: processedData, jobid, bodyshopid, partsorderid });
|
||||
const billForm = await generateBillFormData({ processedData: processedData, jobid, bodyshopid, partsorderid, req: request });
|
||||
//const billResult = await generateBillFormData({ result, });
|
||||
response.status(200).send({
|
||||
success: true,
|
||||
|
||||
Reference in New Issue
Block a user