Update CSV import queries to include 'pending' status for datevlink field
- Modified SQL update queries in the csvImport.js file to allow for 'pending' status in addition to NULL or empty values for the datevlink field in both tUmsatzBeleg and tPdfObjekt tables. This change enhances the handling of datevlink updates during the import process.
This commit is contained in:
@@ -489,7 +489,7 @@ router.post('/import-datev-beleglinks', authenticateToken, async (req, res) => {
|
|||||||
const updateQuery = `
|
const updateQuery = `
|
||||||
UPDATE eazybusiness.dbo.tUmsatzBeleg
|
UPDATE eazybusiness.dbo.tUmsatzBeleg
|
||||||
SET datevlink = @datevlink
|
SET datevlink = @datevlink
|
||||||
WHERE kUmsatzBeleg = @kUmsatzBeleg AND (datevlink IS NULL OR datevlink = '')
|
WHERE kUmsatzBeleg = @kUmsatzBeleg AND (datevlink IS NULL OR datevlink = '' OR datevlink = 'pending')
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const updateResult = await executeQuery(updateQuery, {
|
const updateResult = await executeQuery(updateQuery, {
|
||||||
@@ -515,7 +515,7 @@ router.post('/import-datev-beleglinks', authenticateToken, async (req, res) => {
|
|||||||
const updateQuery = `
|
const updateQuery = `
|
||||||
UPDATE eazybusiness.dbo.tPdfObjekt
|
UPDATE eazybusiness.dbo.tPdfObjekt
|
||||||
SET datevlink = @datevlink
|
SET datevlink = @datevlink
|
||||||
WHERE kPdfObjekt = @kPdfObjekt AND (datevlink IS NULL OR datevlink = '')
|
WHERE kPdfObjekt = @kPdfObjekt AND (datevlink IS NULL OR datevlink = '' OR datevlink = 'pending')
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const updateResult = await executeQuery(updateQuery, {
|
const updateResult = await executeQuery(updateQuery, {
|
||||||
|
|||||||
Reference in New Issue
Block a user