rm console.logs
This commit is contained in:
@@ -21,7 +21,6 @@ const _qlsToUpdateDifferences = (ownAddresses, remoteAddresses) =>
|
|||||||
if (remoteAddress) {
|
if (remoteAddress) {
|
||||||
const diff = _diff(ownAddress, remoteAddress)
|
const diff = _diff(ownAddress, remoteAddress)
|
||||||
if (Object.keys(diff).length) {
|
if (Object.keys(diff).length) {
|
||||||
console.log('changing', diff)
|
|
||||||
return UPDATE(ShippingAddresses)
|
return UPDATE(ShippingAddresses)
|
||||||
.set(diff)
|
.set(diff)
|
||||||
.where({
|
.where({
|
||||||
@@ -42,7 +41,6 @@ bupaSrv.on('sap/S4HANAOD/c532/BO/BusinessPartner/Changed', async msg => {
|
|||||||
|
|
||||||
const ownAddresses = await tx.run(selectQl)
|
const ownAddresses = await tx.run(selectQl)
|
||||||
if (ownAddresses && ownAddresses.length > 0) {
|
if (ownAddresses && ownAddresses.length > 0) {
|
||||||
console.log('found')
|
|
||||||
const txExt = bupaSrv.transaction(msg)
|
const txExt = bupaSrv.transaction(msg)
|
||||||
try {
|
try {
|
||||||
const remoteAddresses = await txExt.run(selectQl)
|
const remoteAddresses = await txExt.run(selectQl)
|
||||||
@@ -52,6 +50,7 @@ bupaSrv.on('sap/S4HANAOD/c532/BO/BusinessPartner/Changed', async msg => {
|
|||||||
)
|
)
|
||||||
if (qlsToUpdateDifferences.length) {
|
if (qlsToUpdateDifferences.length) {
|
||||||
await Promise.all(qlsToUpdateDifferences.map(ql => tx.run(ql)))
|
await Promise.all(qlsToUpdateDifferences.map(ql => tx.run(ql)))
|
||||||
|
// await tx.run(qlsToUpdateDifferences)
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user