8713-testToMaster #3523

Merged
alexm merged 383 commits from 8713-testToMaster into master 2025-03-04 06:52:15 +00:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit dc989cb075 - Show all commits

View File

@ -48,12 +48,10 @@ module.exports = Self => {
}, myOptions);
let asien = bookEntry?.ASIEN;
const invoiceIn = await Self.findById(invoiceInId, myOptions);
if (asien) {
accountingEntries = await models.Xdiario.count({ASIEN: asien}, myOptions);
await models.Xdiario.destroyAll({ASIEN: asien}, myOptions);
const invoiceIn = await Self.findById(invoiceInId, myOptions);
await invoiceIn.updateAttribute('isBooked', false, myOptions);
} else {
const linkedBookEntry = await models.Xdiario.findOne({
fields: ['ASIEN'],
@ -66,6 +64,8 @@ module.exports = Self => {
asien = linkedBookEntry?.ASIEN;
isLinked = true;
}
await invoiceIn.updateAttribute('isBooked', false, myOptions);
if (tx) await tx.commit();
return {